package com.lib.basex.widget.border;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;

import androidx.annotation.Nullable;

/**
 * @author Alan
 * 时 间：2021/2/25
 * 简 述：<功能简述>
 */
public class LLinearLayout extends LinearLayout implements IShapeView {

    protected LViewHelper borderViewHelper;

    public LLinearLayout(Context context) {
        this(context, null);
    }

    public LLinearLayout(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init(attrs);
    }

    protected void init(AttributeSet attrs) {
        borderViewHelper = new LViewHelper(this, attrs);
    }


    @Override
    public LViewStyle getNormalStyle() {
        return borderViewHelper.getNormalStyle();
    }

    @Override
    public LViewStyle getPressStyle() {
        return borderViewHelper.getPressStyle();
    }

    @Override
    public LViewStyle getUnEnableStyle() {
        return borderViewHelper.getUnEnableStyle();
    }

    @Override
    public void setUnEnableStyle(LViewStyle unEnableStyle) {
        borderViewHelper.setUnEnableStyle(unEnableStyle);
    }

    @Override
    public void setNormalStyle(LViewStyle normalStyle) {
        borderViewHelper.setNormalStyle(normalStyle);
    }

    @Override
    public void setPressStyle(LViewStyle pressStyle) {
        borderViewHelper.setPressStyle(pressStyle);
    }

    @Override
    public void update() {
        borderViewHelper.update();
    }
}
